package net.csdn.business.kanban.api.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName KanbanDetail
 * @Description TODO
 * @Author liuzhisheng
 * @Date 2023/9/14
 **/
@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("kanban_detail")
@Schema(description = "看板明细表")
public class KanbanDetail implements Serializable {
    @JSONField(serialize = false)
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(name = "id", description = "看板内容ID")
    private Long id;

    @Schema(name = "object_id", description = "映射ID")
    private String objectId;

    @TableField(value = "kanban_id")
    @Schema(name = "kanban_id", description = "看板ID")
    private String kanbanId;

    @TableField(value = "project_id")
    @Schema(name = "project_id", description = "项目ID")
    private Long projectId;

    @TableField(value = "business_type")
    @Schema(name = "business_type", description = "业务类型 1:issue 2:mr")
    private Integer businessType;

    @TableField(value = "business_id")
    @Schema(name = "business_id", description = "业务ID 对应business_type")
    private String businessId;

    @TableField(value = "business_status")
    @Schema(name = "business_status", description = "状态 0:关闭 1:开启")
    private Integer businessStatus;

    @TableField(value = "archived_task")
    @Schema(name = "archived_task", description = "是否归档任务 0:未归档 1:已归档")
    private Boolean archivedTask;

    @TableField(value = "serial_number")
    @Schema(name = "serial_number", description = "issue序号")
    private Integer serialNumber;

    @TableField(value = "title")
    @Schema(name = "title", description = "标题")
    private String title;

    @TableField(value = "assignee")
    @Schema(name = "assignee", description = "负责人")
    private String assignee;

    @TableField(value = "labels")
    @Schema(name = "labels", description = "标签")
    private String labels;

    @TableField(value = "milepost")
    @Schema(name = "milepost", description = "里程碑")
    private String milepost;

    @TableField(value = "creator_id")
    @Schema(name = "creator_id", description = "创建人ID")
    private String creatorId;

    @Schema(name = "created_at", description = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    @Schema(name = "updated_at", description = "更新时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    @TableField(value = "field_content_json")
    @Schema(name = "field_content_json", description = "字段内容JSON:{字段id:value}]")
    private String fieldContentJson;

    /** 审核状态 */
    @Schema(name="audit_status",description = "审核状态")
    private Integer auditStatus;
}
